
FROM openjdk:8-alpine

#RUN wget -O /tmp/kafka.tgz https://mirrors.bfsu.edu.cn/apache/kafka/2.8.0/kafka_2.13-2.8.0.tgz \
#  && tar xvf /tmp/kafka.tgz -C / \
#  && apk add --no-cache bash \
#  && rm -rf /tmp/*

ARG kafka_version=kafka_2.13-2.6.2

COPY ${kafka_version}.tgz /tmp/${kafka_version}.tgz
RUN tar xvf /tmp/${kafka_version}.tgz -C / \
  && apk add --no-cache bash \
  && rm -rf /tmp/*

ENV TZ=Asia/Shanghai \ 
  LANG=C.UTF-8 \
  run_foreground=false


WORKDIR /${kafka_version}

CMD ["java", "-version"]
